package com.nd.dao;

import cn.hutool.core.date.DateTime;
import com.nd.pojo.bean.Order;
import com.nd.pojo.bean.OrderExample;
import com.nd.pojo.bo.OrderRefundBO;
import com.nd.pojo.bo.OrderShipBO;
import com.nd.pojo.vo.wx.OrderActionBO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface OrderMapper {
    long countByExample(OrderExample example);

    int deleteByExample(OrderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    List<Order> selectByExample(OrderExample example);

    Order selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByExample(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    void orderRefund(OrderRefundBO orderRefundBO, @Param("orderStatus") Integer orderStatus);

    void orderShip(OrderShipBO orderShipBO);

    int countByOrderStatus(@Param("userId") Integer userId, @Param("orderStatus") int orderStatus);

    int countByComments(@Param("userId") Integer userId, @Param("comments") int comments);

    List<Order> selectOrderIdsByUserId(Integer userId);
    void orderCancel(Integer orderId);

    void orderWxRefund(OrderActionBO orderId);

    void orderWxDelete(OrderActionBO orderId);

    void orderWxConfirm(OrderActionBO orderId);

    void orderComment(Integer orderGoodsId);

    int selectKey();
}